home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 2.4 KB | 83 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWIText.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWITEXT_H
- #define FWITEXT_H
-
- // --- Foundation includes ---
-
- #ifndef FWSTRS_H
- #include "FWStrs.h"
- #endif
-
- // ----- OpenDoc utilities -----
- #ifndef _ITEXT_
- #include "IText.h"
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // Constants
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- // On the Mac, script code of 0 is smRoman, and language code of 0 is English
- #define FW_kDefaultScriptCode 0
- #define FW_kDefaultLangCode 0
- #endif
-
- #ifdef FW_BUILD_WIN
- // [KVV] Is this correct for Windows?
- #define FW_kDefaultScriptCode 0
- #define FW_kDefaultLangCode 0
- #endif
-
- //========================================================================================
- // Macro
- //========================================================================================
-
- #ifdef FW_DEBUG
- #ifdef FW_BUILD_MAC
- #define FW_CHECK_ODITEXT_FORMAT(I) FW_ASSERT(I != NULL && (I)->format == kODTraditionalMacText)
- #endif
- #ifdef FW_BUILD_WIN
- #define FW_CHECK_ODITEXT_FORMAT(I) // [KVV] Windows ???
- #endif
- #else
- #define FW_CHECK_ODITEXT_FORMAT(I)
- #endif
-
- //========================================================================================
- // Global functions
- //========================================================================================
-
- FW_FUNC_ATTR void SetITextString(ODIText* iText, const FW_CString& string);
- FW_FUNC_ATTR ODIText* CreateITextString(const FW_CString& string);
-
- //========================================================================================
- // Global functions
- //========================================================================================
-
- inline FW_FUNC_ATTR void SetITextString(ODIText* iText, const FW_CString& string)
- {SetITextCString(iText,(char*)((const FW_Char*)string));}
-
- inline FW_FUNC_ATTR ODIText* CreateITextString(const FW_CString& string)
- {return CreateITextCString(FW_kDefaultScriptCode, FW_kDefaultLangCode, (char*)((const FW_Char*)string));}
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
-
-
- #endif
-